import Https from '@/utils/https'

// 角色详情
const getRoleById = (params) => Https.get('/api/v1/authority/role/getByIdWithMenu', params)
// 菜单列表
const getMenuList = (params) => Https.get('/api/v1/menu/list', params)
// 新建角色
const addRole = (params) => Https.post('/api/v1/authority/role/addRole', params)
// 编辑角色
const editRole = (params) => Https.post('/api/v1/authority/role/editRole', params)
// 删除角色
const delRole = (params) => Https.post('/api/v1/authority/role/delRole', params, { json: false })

export {
  getRoleById, getMenuList, addRole, editRole, delRole,
}
